<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>白牛开车计算器</title>
</head>
<body>
<h1>白牛开车计算器</h1>
<h2>移动速度：<span id="ms">295</span></h2>
<h2><span id="method">普通攻击</span>触发巨力重击伤害：<span id="dmg">0</span></h2>
<h3>对英雄单位（25%魔法抗性）：<span id="dmgB">0</span></h3>
<h3>对非英雄单位：<span id="dmgC">0</span></h3>
<h2 id="7"></h2>
<p><a href="javascript:void(0);" onclick="sw('table1', 'sw1s')" id="sw1">点击<span id="sw1s">展开</span>表格：近战小兵生命值与时间之间的关系</a></p>
<div id="table1" style="display:none;">
<table border="1">
<thead>
<tr><th>时间</th><th>近战小兵生命值</th></tr>
</thead>
<tbody>
<tr><th>00:00</th><td>550</td></tr>
<tr><th>07:30</th><td>562</td></tr>
<tr><th>15:00</th><td>574</td></tr>
<tr><th>22:30</th><td>586</td></tr>
<tr><th>30:00</th><td>598</td></tr>
<tr><th>37:30</th><td>610</td></tr>
<tr><th>45:00</th><td>622</td></tr>
<tr><th>52:30</th><td>634</td></tr>
<tr><th>60:00</th><td>646</td></tr>
<tr><td colspan="2">参见<a href="https://dota2.fandom.com/zh/wiki/%E7%BA%BF%E4%B8%8A%E5%B0%8F%E5%85%B5">Dota 2 Wiki</a></td></tr>
</tbody>
</table>
</div>
<form>
<table>
<tr><td>暗影冲刺等级：</td>
<td>
<input type="radio" name="Q" value="0" checked>0
<input type="radio" name="Q" value="1">1
<input type="radio" name="Q" value="2">2
<input type="radio" name="Q" value="3">3
<input type="radio" name="Q" value="4">4
</td></tr>
<tr><td>威吓等级：</td>
<td>
<input type="radio" name="W" value="0" checked>0
<input type="radio" name="W" value="1">1
<input type="radio" name="W" value="2">2
<input type="radio" name="W" value="3">3
<input type="radio" name="W" value="4">4
</td></tr>
<tr><td>巨力重击等级：</td>
<td>
<input type="radio" name="E" value="0" checked>0
<input type="radio" name="E" value="1">1
<input type="radio" name="E" value="2">2
<input type="radio" name="E" value="3">3
<input type="radio" name="E" value="4">4
</td></tr>
<tr><td>20级左天赋：</td>
<td>
<input type="radio" name="lv20" value="0" checked>无
<input type="radio" name="lv20" value="1">有
</td></tr>
<tr><td>25级右天赋：</td>
<td>
<input type="radio" name="lv25" value="0" checked>无
<input type="radio" name="lv25" value="1">有
</td></tr></table>
<br>
<table>
<tr><td>鞋子：</td>
<td>
<input type="radio" name="boots" value="0" checked>无
<input type="radio" name="boots" value="45">速度之靴/相位鞋/动力鞋/奥术鞋
<input type="radio" name="boots" value="65">静谧之鞋
<input type="radio" name="boots" value="40">静谧之鞋（破损）
<input type="radio" name="boots" value="100">远行鞋
<input type="radio" name="boots" value="120">远行鞋2
</td></tr>
<tr><td>风灵之纹：</td>
<td>
<input type="radio" name="lace" value="0" checked>无
<input type="radio" name="lace" value="20">有
</td></tr>
<tr><td>韧鼓：</td>
<td>
<input type="radio" name="janggo" value="0" checked>无
<input type="radio" name="janggo" value="20">有
</td></tr>
<tr><td>炎阳纹章：</td>
<td>
<input type="radio" name="crest" value="0" checked>无
<input type="radio" name="crest" value="20">有
</td></tr>
<tr><td>EUL的神圣法杖：</td>
<td>
<input type="radio" name="eul" value="0" checked>无
<input type="radio" name="eul" value="20">有
</td></tr>
<tr><td>风之杖：</td>
<td>
<input type="radio" name="EUL" value="0" checked>无
<input type="radio" name="EUL" value="50">有
</td></tr>
<tr><td>空灵挂件：</td>
<td>
<input type="radio" name="talisman" value="0" checked>无
<input type="radio" name="talisman" value="0.03">1
<input type="radio" name="talisman" value="0.06">2
<input type="radio" name="talisman" value="0.09">3
<input type="radio" name="talisman" value="0.12">4
<input type="radio" name="talisman" value="0.15">5
<input type="radio" name="talisman" value="0.18">6
<input type="radio" name="talisman" value="7.77">7
</td></tr>
<tr><td>夜叉/慧光：</td>
<td>
<input type="radio" name="dao" value="0" checked>无
<input type="radio" name="dao" value="8">夜叉
<input type="radio" name="dao" value="0.08">慧光
<input type="radio" name="dao" value="10.16">慧夜对剑
<input type="radio" name="dao" value="8.16">散慧对剑 + 夜叉
<input type="radio" name="dao" value="10.08">散夜对剑 + 慧光
</td></tr>
<tr><td>血精石：</td>
<td>
<input type="radio" name="bloodstone" value="0" checked>无
<input type="radio" name="bloodstone" value="1">有，层数=
<input type="number" name="bloodstonestacks" value="14">
</td></tr>
<tr><td>中立物品：</td>
<td>
<input type="radio" name="natural" value="0" checked>无
</td></tr>
<tr><td>・移动速度</td>
<td>
<input type="radio" name="natural" value="20">仙灵榴弹
<input type="radio" name="natural" value="1.08">银闪护符
<input type="radio" name="natural" value="25">网虫腿/忍者用具
<input type="radio" name="natural" value="1.07">精灵外衣
<input type="radio" name="natural" value="35">闪灵
<input type="radio" name="natural" value="115">原力鞋
<input type="radio" name="natural" value="50">巨人之戒
</td></tr>
<tr><td>・技能增强</td>
<td>
<input type="radio" name="natural" value="0.05">仙灵饰品
<input type="radio" name="natural" value="0.06">幽冥披巾/臂甲（智力）
<input type="radio" name="natural" value="0.15">永恒遗物
</td></tr></table>
<br>
<table>
<tr><td>正在暗影冲刺：</td>
<td>
<input type="radio" name="QQ" value="0" checked>无
<input type="radio" name="QQ" value="1">有
</td></tr>
<tr><td>开启威吓：</td>
<td>
<input type="radio" name="WW" value="0" checked>无
<input type="radio" name="WW" value="1">有
</td></tr>
<tr><td>开启相位鞋：</td>
<td>
<input type="radio" name="PP" value="0" checked>无
<input type="radio" name="PP" value="0.20">有
</td></tr>
<tr><td>开启韧鼓：</td>
<td>
<input type="radio" name="JJ" value="0" checked>无
<input type="radio" name="JJ" value="0.13">有
</td></tr>
<tr><td>开启疯狂面具：</td>
<td>
<input type="radio" name="MM" value="0" checked>无
<input type="radio" name="MM" value="30">有
</td></tr>
<tr><td>开启网虫腿：</td>
<td>
<input type="radio" name="LL" value="0" checked>无
<input type="radio" name="LL" value="0.22">有
</td></tr>
<tr><td>开启影刃/白银之锋：</td>
<td>
<input type="radio" name="SS" value="0" checked>无
<input type="radio" name="SS" value="0.20">影刃
<input type="radio" name="SS" value="0.25">白银之锋
</td></tr>
<tr><td>正处于迅疾闪光的作用下：</td>
<td>
<input type="radio" name="BB" value="0" checked>无
<input type="radio" name="BB" value="0.40">有
</td></tr></table>
<p><a href="javascript:void(0);" onclick="sw('table2', 'sw2s')" id="sw1">点击<span id="sw2s">展开</span>：其他加速效果</a></p>
<div id="table2" style="display:none;">
<table>
<tr><td>炼金术士 - 狂暴药剂：</td>
<td>
<input type="radio" name="EE1" value="0" checked>无
<input type="radio" name="EE1" value="30">有
</td></tr>
<tr><td>干扰者 - 风雷之击（魔晶）：</td>
<td>
<input type="radio" name="EE2" value="0" checked>无
<input type="radio" name="EE2" value="0.50">有
</td></tr>
<tr><td>天涯墨客 - 墨涌：</td>
<td>
<input type="radio" name="EE3" value="0" checked>无
<input type="radio" name="EE3" value="0.10">1级
<input type="radio" name="EE3" value="0.12">2级
<input type="radio" name="EE3" value="0.14">3级
<input type="radio" name="EE3" value="0.16">4级
<br>
<input type="radio" name="EE3" value="0.26">1级（15级左天赋）
<input type="radio" name="EE3" value="0.28">2级（15级左天赋）
<input type="radio" name="EE3" value="0.30">3级（15级左天赋）
<input type="radio" name="EE3" value="0.32">4级（15级左天赋）
</td></tr>
<tr><td>食人魔魔法师 - 嗜血术：</td>
<td>
<input type="radio" name="EE4" value="0" checked>无
<input type="radio" name="EE4" value="0.07">1级
<input type="radio" name="EE4" value="0.09">2级
<input type="radio" name="EE4" value="0.11">3级
<input type="radio" name="EE4" value="0.13">4级
</td></tr>
<tr><td>昆卡 - 幽灵船：</td>
<td>
<input type="radio" name="EE5" value="0" checked>无
<input type="radio" name="EE5" value="0.12">有
</td></tr>
<tr><td>玛西 - 回身踢：</td>
<td>
<input type="radio" name="EE6" value="0" checked>无
<input type="radio" name="EE6" value="0.35">有
</td></tr>
<tr><td>德鲁伊 - 野蛮咆哮（魔晶）：</td>
<td>
<input type="radio" name="EE7" value="0" checked>无
<input type="radio" name="EE7" value="0.20">有
</td></tr>
<tr><td>米拉娜 - 月之暗面：</td>
<td>
<input type="radio" name="EE8" value="0" checked>无
<input type="radio" name="EE8" value="0.09">1级
<input type="radio" name="EE8" value="0.12">2级
<input type="radio" name="EE8" value="0.15">3级
</td></tr>
<tr><td>术士 - 暗言术（魔晶）：</td>
<td>
<input type="radio" name="EE9" value="0" checked>无
<input type="radio" name="EE9" value="0.10">有
</td></tr>
<tr><td>斯温 - 战吼：</td>
<td>
<input type="radio" name="EE10" value="0" checked>无
<input type="radio" name="EE10" value="0.08">1级
<input type="radio" name="EE10" value="0.12">2级
<input type="radio" name="EE10" value="0.16">3级
<input type="radio" name="EE10" value="0.20">4级
</td></tr>
<tr><td>斧王 - 淘汰之刃：</td>
<td>
<input type="radio" name="EE11" value="0" checked>无
<input type="radio" name="EE11" value="0.30">有
</td></tr>
<tr><td>冥魂大帝 - 绝冥再生（神杖）：</td>
<td>
<input type="radio" name="EE12" value="0" checked>无
<input type="radio" name="EE12" value="0.25">有
</td></tr>
<tr><td>狗头人长官 - 速度光环：</td>
<td>
<input type="radio" name="EE13" value="0" checked>无
<input type="radio" name="EE13" value="0.12">有
</td></tr>
<tr><td>艾欧 - 羁绊：</td>
<td>
<input type="radio" name="EE14" value="0" checked>无
<input type="radio" name="EE14" value="0.06">1级
<input type="radio" name="EE14" value="0.08">2级
<input type="radio" name="EE14" value="0.10">3级
<input type="radio" name="EE14" value="0.12">4级
<br>
<input type="radio" name="EE14" value="0.14">1级（魔晶）
<input type="radio" name="EE14" value="0.16">2级（魔晶）
<input type="radio" name="EE14" value="0.18">3级（魔晶）
<input type="radio" name="EE14" value="0.20">4级（魔晶）
</td></tr>
</table>
</div>
</form>
<p>游戏版本：7.30e</p>
<p id="notMyFault">甩锅声明：计算结果为理论值，仅供参考，如有出入请以游戏内实际效果为准</p>
<p>反馈（NGA）：<a href="https://ngabbs.com/read.php?tid=30320232">https://ngabbs.com/read.php?tid=30320232</a></p>
<script type="text/javascript">
function calc() {
    var ms = 295;
    var Qms = [0, 300, 325, 350, 375]
    var Wms = [0, 0.10, 0.16, 0.22, 0.28]
    var Edmg = [0, 0.14, 0.20, 0.26, 0.32]
    var extraEffectList = ['EE2', 'EE3', 'EE4', 'EE5', 'EE6', 'EE7', 'EE8', 'EE9', 'EE10', 'EE11', 'EE12', 'EE13', 'EE14']
    var form = document.querySelector("form");
    var data = new FormData(form);
    var buff = {};
    for (const entry of data) {
        buff[entry[0]] = entry[1];
    };
    if (buff.talisman == "7.77"){
        document.getElementById('7').innerHTML = "兄啊，7个挂件你要怎么带啊";
        return;
    }
    else {
        document.getElementById('7').innerHTML = "";
    }

    var isQ = parseInt(buff.QQ)
    var isW = parseInt(buff.WW)
    var Qlv = parseInt(buff.Q)
    var Wlv = parseInt(buff.W)
    var Elv = parseInt(buff.E)
    var natural = parseFloat(buff.natural)
    if (parseInt(buff.lv25)){
        Edmg = [0, 0.39, 0.45, 0.51, 0.57];
    }
    var fromBoots = parseInt(buff.boots);
    var isPhaseBoots = parseFloat(buff.PP);
    if (isPhaseBoots){
        fromBoots = Math.max(45, fromBoots)
    }
    isSpiderLegs = parseFloat(buff.LL)
    if (isSpiderLegs){
        natural = 25
    }
    if (natural == 115) {
        fromBoots = Math.max(fromBoots - natural, 0)
    }

    ms = ms + fromBoots + parseInt(buff.lace) + parseInt(buff.janggo) + parseInt(buff.crest) + parseInt(buff.eul) + parseInt(buff.EUL) + parseInt(buff.EE1);
    if (isQ){
        ms += Qms[Qlv];
        if (parseInt(buff.lv20)){
            ms += 200;
        }
        document.getElementById('method').innerHTML = "暗影冲刺";
    }
    else {
        document.getElementById('method').innerHTML = "普通攻击";
    }
    if (parseInt(buff.MM)){
        ms += 30;
    }
    var mspb = 1;
    mspb = mspb + parseFloat(buff.JJ) + parseFloat(buff.LL) + parseFloat(buff.SS) + parseFloat(buff.BB) + parseInt(buff.dao) / 100 + isPhaseBoots;
    if (isW){
        mspb += Wms[Wlv];
    }
    if (natural > 1 && natural < 2){
        mspb += natural - 1;
    }
    else if (natural > 2){
        ms += natural;
    }
    for (i=0; i<extraEffectList.length; i++){
        mspb += parseFloat(buff[extraEffectList[i]])
    }
    ms = parseInt(ms * mspb);
    if (isQ == 0 && ms > 550 && natural != 115){
        ms = 550;
    }

    spb = 1;
    if (natural < 1){
        spb += natural;
    }
    fromBloodStone = parseInt(buff.bloodstone)
    if (fromBloodStone){
        fromBloodStone = 8 + 0.35 * parseInt(buff.bloodstonestacks)
    }
    daopb = Math.max(parseFloat(buff.dao) * 100 % 100, fromBloodStone);
    if (daopb){
        spb += daopb / 100;
    }
    spb += parseFloat(buff.talisman)

    dmg = parseInt(ms * Edmg[Elv] * spb);

    document.getElementById('ms').innerHTML = ms;
    document.getElementById('dmg').innerHTML = dmg;
    document.getElementById('dmgB').innerHTML = dmg * 0.75;
    document.getElementById('dmgC').innerHTML = dmg * 1.5;
}

function sw(table, text){
    if (document.getElementById(table).style.display == "none"){
        document.getElementById(table).style.display="";
        document.getElementById(text).innerHTML="收起";
    }
    else {
        document.getElementById(table).style.display="none";
        document.getElementById(text).innerHTML="展开";
    }
}

var inputs = document.getElementsByTagName("input"); 
for (i=0; i<inputs.length; i++){
   inputs[i].onchange = calc;
}
</script>
</body>
</html>